﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SkillifyMaster.master" AutoEventWireup="true" CodeFile="CreateAssignment.aspx.cs" Inherits="CreateAssignment" %>

<%@ Register src="~/UserControls/UserSelection.ascx" tagname="UserSelection" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 185px;
            
        }
        .style2
        {
            width: 53px;
        }
        .style4
        {
            width: 77px;
        }
        .style5
        {
            width: 202px;
        }
        .style6
        {
            height: 37px;
        }
        .style7
        {
            height: 98px;
        }
        .style8
        {
            height: 46px;
        }
        .style9
        {
            height: 36px;
        }
        .style10
        {
            height: 41px;
        }
    </style>

    <script type="text/javascript" language="javascript">
        function check(value) {


            var ddlVal = document.getElementsByName("Assignment")
            var pnl = document.getElementById("pnlSubject");
            if (ddlVal = "2") {

                document.formTable.disabled = false;

            }
            else {
                document.formTable.disabled = true;

            }
        }

        function OnClick() {
            if (divStartDtCalendar.style.display == "none") {
                divStartDtCalendar.style.display = "";

            }

            else {
                divStartDtCalendar.style.display = "none";

            }


        }
        function OnCalendarClick() {
            if (divEndDtCalendar.style.display == "none") {
                divEndDtCalendar.style.display = "";

            }

            else {
                divEndDtCalendar.style.display = "none";

            }


        }

        //            function change() {
        //                alert(divCalendar.childNodes.item.display);
        //                //ddlStartDate.text = divCalendar.nodeValue;
        //            }

    
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table width="100%" cellspacing="5" align="left" style="border: 4px outset orange;">

        <tr>
            <td align="right" width="20%">
            </td>
            <td align="right">
                <h2><asp:Label ID="lablCreateAss" runat="server" Text="Create Assignment"></asp:Label></h2>
            </td>
        </tr>

        <tr>
            <td align="right" width="20%" class="style6">
               <b><asp:Label ID="lablAss" runat="server" Text="Assignment Name"></asp:Label></b> 
            </td>

            <td class="style6">
            &nbsp;&nbsp;
                <asp:TextBox ID="txtAssigName" runat="server" Width="250px" AutoPostBack="True" 
                    ontextchanged="txtAssigName_TextChanged"></asp:TextBox>
            &nbsp;
                <asp:RequiredFieldValidator ID="reqAssNameVal" runat="server" 
                    ErrorMessage="Please Give Assignment Name" ForeColor="Red" 
                    ControlToValidate="txtAssigName">*</asp:RequiredFieldValidator>
&nbsp;<asp:Label ID="lablAssNameError" runat="server" ForeColor="Red"></asp:Label>
            </td>
        </tr>

        <tr>
            <td align="right" width="20%" class="style6">
                <b><asp:Label ID="lablSub" runat="server" Text="Subject"></asp:Label></b>
            </td> 

            <td class="style6">
                &nbsp;&nbsp;
                <asp:DropDownList ID="ddlSub" runat="server" AutoPostBack="True" 
                   Width="260px" onselectedindexchanged="ddlSub_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:CompareValidator ID="CompSubVal" runat="server" 
                   ControlToValidate="ddlSub" ErrorMessage="Must Select one Subject" 
                   ForeColor="Red" Operator="NotEqual" ValueToCompare="--Select One--">*</asp:CompareValidator>
            </td>                               
         </tr>

        <tr>
            <td align="right" width="20%" class="style6">
                <b><asp:Label ID="lablTopic" runat="server" Text="Topic"></asp:Label></b>
            </td> 
            <td class="style6">
                &nbsp;&nbsp;
                <asp:DropDownList ID="ddlTopic" runat="server" Width="260px">
                </asp:DropDownList>
            </td>                               
       </tr>

        <tr>
            <td align="right" width="20%" class="style7">
                <b><asp:Label ID="lablQues" runat="server" Text="Question"></asp:Label></b>
            </td> 
            <td class="style7">
                &nbsp;&nbsp;
                <asp:TextBox ID="txtQuestion" runat="server" Height="85px" TextMode="MultiLine" 
                     Width="600px"></asp:TextBox> &nbsp;
                <asp:RequiredFieldValidator ID="ReqValTopic" runat="server" 
                     ControlToValidate="txtQuestion" ErrorMessage="Please Give a Question" 
                     ForeColor="Red">*</asp:RequiredFieldValidator>
                 </td>                               
        </tr>

        <tr>
            <td align="right" width="20%" class="style6">
                <b><asp:Label ID="lablattach" runat="server" Text="Attachement"></asp:Label></b>
            </td>
            <td class="style6">
                &nbsp;&nbsp;
                <asp:FileUpload ID="fileAttahUpload" runat="server" />
            &nbsp;&nbsp;
                <asp:Button ID="btnUpload" runat="server"  
                    Text="Upload File" Width="100px" BackColor="#E49642" BorderColor="#CC7424" 
                    ForeColor="White" onclick="btnUpload_Click" CausesValidation="False" />
                    &nbsp;&nbsp;
                <asp:Label ID="lablFile" runat="server" ForeColor="Black"></asp:Label>
                </td>
        </tr>

        <tr>
            <td align="right" width="20%" class="style8">
                <b><asp:Label ID="lablStartDt" runat="server" Text="Start Date"></asp:Label></b>
            </td>

            <td class="style8">
                <table width="100%">
                    <tr>
                        <td class="style5">
                        &nbsp&nbsp
                            <asp:TextBox id="txtStartDate" runat="server"></asp:TextBox>
                               <INPUT type="button" value=":::" onclick="OnClick()" 
                                 style="border-style: #cc7a24; background-color: #e49642;">
                               <div id="divStartDtCalendar" style="DISPLAY: none; POSITION: absolute">
                               <asp:Calendar id="CalendarDisplay" runat="server" BorderWidth="2px" OnSelectionChanged="CalendarDisplay_SelectionChanged"
                                   BackColor="White" Width="200px"
                                   ForeColor="Black" Height="180px" Font-Size="8pt"
                                   Font-Names="Verdana" BorderColor="#999999"
                                   BorderStyle="Outset" DayNameFormat="FirstLetter" CellPadding="4">
                                   <TodayDayStyle ForeColor="Black" BackColor="#CCCCCC"></TodayDayStyle>
                                   <SelectorStyle BackColor="#CCCCCC"></SelectorStyle>
                                   <NextPrevStyle VerticalAlign="Bottom"></NextPrevStyle>
                                   <DayHeaderStyle Font-Size="7pt" Font-Bold="True" BackColor="#CCCCCC"></DayHeaderStyle>
                                   <SelectedDayStyle Font-Bold="True" ForeColor="White" BackColor="#666666"></SelectedDayStyle>
                                   <TitleStyle Font-Bold="True" BorderColor="Black" BackColor="#999999"></TitleStyle>
                                   <WeekendDayStyle BackColor="#FFFFCC"></WeekendDayStyle>
                                   <OtherMonthDayStyle ForeColor="#808080"></OtherMonthDayStyle>
                               </asp:Calendar>
                               </div>
                         </td>

                        <td class="style4">
                            <b><asp:Label ID="lablEndDt" runat="server" Text="End Date"></asp:Label></b>
                        </td>

                        <td>
                        &nbsp&nbsp
                            <asp:TextBox id="txtEndDate" runat="server"></asp:TextBox>
                                <INPUT type="button" value=":::" onclick="OnCalendarClick()" 
                                   style="border-style: #cc7a24; background-color: #e49642">
                                <div id="divEndDtCalendar" style="DISPLAY: none; POSITION: absolute">
                                    <asp:Calendar id="cldDisplay" runat="server" BorderWidth="2px" OnSelectionChanged="CalendarEndDt_SelectionChanged"
                                        BackColor="White" Width="200px"
                                        ForeColor="Black" Height="180px" Font-Size="8pt"
                                        Font-Names="Verdana" BorderColor="#999999"
                                        BorderStyle="Outset" DayNameFormat="FirstLetter" CellPadding="4">
                                         <TodayDayStyle ForeColor="Black" BackColor="#CCCCCC"></TodayDayStyle>
                                         <SelectorStyle BackColor="#CCCCCC"></SelectorStyle>
                                         <NextPrevStyle VerticalAlign="Bottom"></NextPrevStyle>
                                         <DayHeaderStyle Font-Size="7pt" Font-Bold="True" BackColor="#CCCCCC"></DayHeaderStyle>
                                         <SelectedDayStyle Font-Bold="True" ForeColor="White" BackColor="#666666"></SelectedDayStyle>
                                         <TitleStyle Font-Bold="True" BorderColor="Black" BackColor="#999999"></TitleStyle>
                                         <WeekendDayStyle BackColor="#FFFFCC"></WeekendDayStyle>
                                         <OtherMonthDayStyle ForeColor="#808080"></OtherMonthDayStyle>
                                     </asp:Calendar>
                                  </div>
                        </td>

                    </tr>
                </table>
            </td>
        </tr>

        <tr>
            <td align="right" width="20%">
                &nbsp;</td>

            <td>
                <uc1:UserSelection ID="UserSelection1" runat="server" />
            </td>
        </tr>

        <tr>
            <td align="right" width="20%" class="style9">
                <b><asp:Label ID="lablAssign" runat="server" Text="Assign Task"></asp:Label></b>
            </td>

            <td class="style9">
                <asp:DropDownList ID="ddlStatus" runat="server" Width="220px">
                                <asp:ListItem Selected="True">Scheduled</asp:ListItem>
                                <asp:ListItem>Parked</asp:ListItem>
                                <asp:ListItem>InProgress</asp:ListItem>
                                <asp:ListItem>Completed</asp:ListItem>
                                <asp:ListItem>Pending</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>

        <tr>
            <td align="right" width="20%" class="style9">
            </td>

            <td class="style9">
                <asp:CheckBox ID="chkNotify" runat="server" Text="Notify Test Taker" />
            </td>
        </tr>

        <tr>
            <td align="right" width="20%" class="style9">
            </td>

            <td class="style9">
                <asp:CheckBox ID="chkSendCumulativereport" runat="server" Text="Send Cumulative Report" />
            </td>
        </tr>

        <tr>
            <td align="right" width="20%" class="style10">

            </td> 
            <td class="style10">
                &nbsp;&nbsp;
                <asp:Button ID="btnSubmit" runat="server"  
                    Text="Submit" Width="71px" BackColor="#E49642" BorderColor="#CC7424" 
                    ForeColor="White" onclick="btnSubmit_Click" />
                    &nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnClear" runat="server" CausesValidation="False" 
                     Text="Clear" Width="71px" BackColor="#E49642" 
                    BorderColor="#CC7424" ForeColor="White" onclick="btnClear_Click" />
            </td>                               
      </tr>

        
        <tr>
            <td align="right" width="20%">

            </td> 
            <td>
                &nbsp;&nbsp;
                <asp:ValidationSummary ID="ValidationMessage" runat="server" ForeColor="Red" />
                <br />
                <b><asp:Label ID="lablError" runat="server" ForeColor="Red"></asp:Label></b>
            </td>                               
        </tr>
    </table>
</asp:Content>

